<?php if($this->form){?>
<div id="form-register">
    
    <form method="post" action = "">
        <div class="title"><h2>Đăng ký thành viên</h2></div>
        <div class="input">
            <?php echo $this->form->fullname?>
        </div>
        <div class="input">
            <?php echo $this->form->gender?>
        </div>
        <div class="input">
            <?php echo $this->form->email?>
        </div>   
        <div class="input">
            <?php echo $this->form->password?>
        </div>
        <div class="input">
            <?php echo $this->form->repassword?>
        </div>
        <div class="input">
            <?php echo $this->form->address?>
        </div>
        <div class="input">
            <?php echo $this->form->phone?>
        </div>
        <div class="input">
            <label>Nhập chuỗi bên dưới</label>
            <div class="input-captcha"><?php echo $this->form->txtcaptcha?></div>
            <div class="img-captcha"><?php echo $this->captcha?>
                   <input type="hidden" name="cid" value="<?php echo $this->captcha_id?>"/>        
            </div>
            <a class="refresh" title="refresh" src=""><img class="refresh" alt="refresh" src="<?php echo $this->baseUrl('default/images/view_refresh.ico')?>"></a>            
            
        </div>
        <div class="submit">
            <?php echo $this->form->register?>
        </div>
        <div class="clearb"></div>
    </form>
   
</div><!-- end register -->
<?php }?>
<script>
$(document).ready(function(){
	var link = "<?php echo $this->baseUrl('user/gencaptcha')?>";
	$("#form-register a.refresh").click(function(){
		//alert(link);
	    $.ajax({
	        url: link,
	        success: function(rdata){
		        $("#form-register .img-captcha").html(rdata);
		        },
		    });
	    return false;
		});
});
</script>